#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include<math.h>
int main() {
    int x1, y1, x2, y2, tmp1, tmp2;
    scanf("%d %d", &x1, &y1);
    scanf("%d %d", &x2, &y2);
    tmp1 = pow((x1 - x2), 2);
    tmp2 = pow((y1 - y2), 2);
    printf("%d", tmp1 + tmp2);
    return 0;
}
